\(\renewcommand{\hat}[1]{\widehat{#1}}\)

Shared Qs (027)


  1. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -7\) and \(x\ne 2\)).

    \[\frac{3x-33}{(x+7)(x-2)} = \frac{A}{x+7}+\frac{B}{x-2}\]



    Solution


  2. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -5\) and \(x\ne -8\)).

    \[\frac{5x+46}{(x+5)(x+8)} = \frac{A}{x+5}+\frac{B}{x+8}\]



    Solution


  3. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 2\) and \(x\ne -9\)).

    \[\frac{-12x-64}{(x-2)(x+9)} = \frac{A}{x-2}+\frac{B}{x+9}\]



    Solution


  4. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 6\) and \(x\ne -2\)).

    \[\frac{13x-38}{(x-6)(x+2)} = \frac{A}{x-6}+\frac{B}{x+2}\]



    Solution


  5. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 3\) and \(x\ne -7\)).

    \[\frac{-7x-29}{(x-3)(x+7)} = \frac{A}{x-3}+\frac{B}{x+7}\]



    Solution


  6. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -6\) and \(x\ne -9\)).

    \[\frac{9x+60}{(x+6)(x+9)} = \frac{A}{x+6}+\frac{B}{x+9}\]



    Solution


  7. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 2\) and \(x\ne 6\)).

    \[\frac{13x-42}{(x-2)(x-6)} = \frac{A}{x-2}+\frac{B}{x-6}\]



    Solution


  8. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -8\) and \(x\ne 3\)).

    \[\frac{13x+60}{(x+8)(x-3)} = \frac{A}{x+8}+\frac{B}{x-3}\]



    Solution


  9. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne 9\) and \(x\ne 5\)).

    \[\frac{-4x+52}{(x-9)(x-5)} = \frac{A}{x-9}+\frac{B}{x-5}\]



    Solution


  10. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. The simplest version of partial-fraction decomposition occurs when there are two distinct linear factors.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restrictions \(x\ne -5\) and \(x\ne -2\)).

    \[\frac{-15x-51}{(x+5)(x+2)} = \frac{A}{x+5}+\frac{B}{x+2}\]



    Solution


  11. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 3\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{-4x+18}{(x-3)^2} ~=~ \frac{A}{(x-3)}+\frac{B}{(x-3)^2}\]



    Solution


  12. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 9\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{3x-31}{(x-9)^2} ~=~ \frac{A}{(x-9)}+\frac{B}{(x-9)^2}\]



    Solution


  13. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne -7\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{6x+33}{(x+7)^2} ~=~ \frac{A}{(x+7)}+\frac{B}{(x+7)^2}\]



    Solution


  14. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 2\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{3x-2}{(x-2)^2} ~=~ \frac{A}{(x-2)}+\frac{B}{(x-2)^2}\]



    Solution


  15. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 7\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{-2x+10}{(x-7)^2} ~=~ \frac{A}{(x-7)}+\frac{B}{(x-7)^2}\]



    Solution


  16. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 4\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{-2x+16}{(x-4)^2} ~=~ \frac{A}{(x-4)}+\frac{B}{(x-4)^2}\]



    Solution


  17. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne -2\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{-4x-3}{(x+2)^2} ~=~ \frac{A}{(x+2)}+\frac{B}{(x+2)^2}\]



    Solution


  18. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 4\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{8x-34}{(x-4)^2} ~=~ \frac{A}{(x-4)}+\frac{B}{(x-4)^2}\]



    Solution


  19. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne -6\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{-9x-50}{(x+6)^2} ~=~ \frac{A}{(x+6)}+\frac{B}{(x+6)^2}\]



    Solution


  20. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition. One version of partial-fraction decomposition occurs when there is a squared linear factor.

    The procedure can be exemplified by trying to determine constants \(A\) and \(B\) to satisfy the equation below for all values of \(x\) (with restriction \(x\ne 3\)). It should be said that knowing/remembering how to set up the equation below is the hardest part of partial-fraction decomposition.

    \[\frac{9x-31}{(x-3)^2} ~=~ \frac{A}{(x-3)}+\frac{B}{(x-3)^2}\]



    Solution


  21. Question

    Solve the system of linear equations.

    \[\begin{align} -5x-5y-5z&=-15 \\ -6x-4y-6z&=-4 \\ -x-2y+4z&=-10 \end{align}\]



    Solution


  22. Question

    Solve the system of linear equations.

    \[\begin{align} 3x+3y+4z&=-6 \\ 4x+4y+3z&=-1 \\ 5x+6y-z&=16 \end{align}\]



    Solution


  23. Question

    Solve the system of linear equations.

    \[\begin{align} 6x-2y+6z&=-12 \\ x-2y+2z&=1 \\ -4x-y+6z&=-5 \end{align}\]



    Solution


  24. Question

    Solve the system of linear equations.

    \[\begin{align} x+2y+5z&=-14 \\ -3x+y-2z&=-9 \\ 5x-2y+3z&=16 \end{align}\]



    Solution


  25. Question

    Solve the system of linear equations.

    \[\begin{align} -3x+5y-5z&=19 \\ -4x-y-z&=17 \\ -2x+6y-5z&=18 \end{align}\]



    Solution


  26. Question

    Solve the system of linear equations.

    \[\begin{align} -2x+2y+z&=-4 \\ -6x-3y-6z&=-3 \\ 2x-y+2z&=3 \end{align}\]



    Solution


  27. Question

    Solve the system of linear equations.

    \[\begin{align} 4x-2y-3z&=-16 \\ -6x+2y+z&=10 \\ -6x-2y-5z&=-14 \end{align}\]



    Solution


  28. Question

    Solve the system of linear equations.

    \[\begin{align} 2x+2y-6z&=14 \\ -2x+4y-3z&=-2 \\ 6x+6y+4z&=-2 \end{align}\]



    Solution


  29. Question

    Solve the system of linear equations.

    \[\begin{align} -2x-y+3z&=-16 \\ 2x-2y+2z&=6 \\ 5x-2y+4z&=17 \end{align}\]



    Solution


  30. Question

    Solve the system of linear equations.

    \[\begin{align} -4x+3y-4z&=-4 \\ -6x-5y-3z&=9 \\ 6x-3y+4z&=-4 \end{align}\]



    Solution


  31. Question

    Solve the system of linear equations.

    \[\begin{align} -w-3x-6y-2z&=25 \\ -3w+5x-y-5z&=1 \\ -3w-3x+4y-3z&=-59 \\ 4w-2x-y-2z&=-16 \end{align}\]



    Solution


  32. Question

    Solve the system of linear equations.

    \[\begin{align} 4w+3x+y-5z&=22 \\ w+x+y-z&=12 \\ -2w-2x-5y-z&=-51 \\ -4w+x-y-z&=-26 \end{align}\]



    Solution


  33. Question

    Solve the system of linear equations.

    \[\begin{align} w+3x-4y+3z&=83 \\ -3w-4x-2y-3z&=-41 \\ 6w+x+6y-6z&=-76 \\ -6w-2x-2y+z&=-3 \end{align}\]



    Solution


  34. Question

    Solve the system of linear equations.

    \[\begin{align} 2w-4x+y+2z&=-3 \\ 2w-5x+4y+5z&=28 \\ -5w+x-6y+z&=-51 \\ -3w+x-6y-6z&=-70 \end{align}\]



    Solution


  35. Question

    Solve the system of linear equations.

    \[\begin{align} 4w+3x+6y-6z&=77 \\ -w-x-2y+5z&=-41 \\ 4w-6x+4y-4z&=38 \\ 2w-2x+2y+3z&=-8 \end{align}\]



    Solution


  36. Question

    Solve the system of linear equations.

    \[\begin{align} 6w+6x-2y-6z&=-28 \\ 3w-3x+3y-4z&=64 \\ -5w+4x+5y-4z&=23 \\ w+x-y+3z&=-26 \end{align}\]



    Solution


  37. Question

    Solve the system of linear equations.

    \[\begin{align} 6w+3x+2y+z&=4 \\ w+6x-4y-6z&=-10 \\ -2w-x-y+4z&=-3 \\ -6w-x+4y+6z&=30 \end{align}\]



    Solution


  38. Question

    Solve the system of linear equations.

    \[\begin{align} -w+4x+6y-2z&=-67 \\ 3w+2x+2y+3z&=-49 \\ 3w-4x-4y+4z&=37 \\ -6w+5x+2y+4z&=16 \end{align}\]



    Solution


  39. Question

    Solve the system of linear equations.

    \[\begin{align} w-5x-3y+3z&=-7 \\ 4w-4x-y+z&=-41 \\ 4w-3x-2y-5z&=-30 \\ -4w+x-3y-z&=57 \end{align}\]



    Solution


  40. Question

    Solve the system of linear equations.

    \[\begin{align} -4w+x+2y+4z&=-16 \\ -4w-4x-3y+3z&=5 \\ -4w+5x+6y+4z&=-32 \\ -2w+6x-2y+z&=-63 \end{align}\]



    Solution


  41. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-13x^2-14x+3}{(x+3)(x-5)(x+2)} = \frac{A}{x+3}+\frac{B}{x-5}+\frac{C}{x+2}\]



    Solution


  42. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-4x^2-9x+13}{(x+2)(x+5)(x+3)} = \frac{A}{x+2}+\frac{B}{x+5}+\frac{C}{x+3}\]



    Solution


  43. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-5x^2-14x+12}{(x+6)(x+3)(x+2)} = \frac{A}{x+6}+\frac{B}{x+3}+\frac{C}{x+2}\]



    Solution


  44. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-7x^2-9x+18}{(x-2)(x-3)(x+5)} = \frac{A}{x-2}+\frac{B}{x-3}+\frac{C}{x+5}\]



    Solution


  45. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-4x^2+9x+19}{(x-2)(x-5)(x-3)} = \frac{A}{x-2}+\frac{B}{x-5}+\frac{C}{x-3}\]



    Solution


  46. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-11x^2+8x+12}{(x+6)(x-2)(x-3)} = \frac{A}{x+6}+\frac{B}{x-2}+\frac{C}{x-3}\]



    Solution


  47. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-10x^2-7x+5}{(x-5)(x+3)(x+2)} = \frac{A}{x-5}+\frac{B}{x+3}+\frac{C}{x+2}\]



    Solution


  48. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{3x^2+11x+16}{(x+2)(x+5)(x+3)} = \frac{A}{x+2}+\frac{B}{x+5}+\frac{C}{x+3}\]



    Solution


  49. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{-11x^2-11x+10}{(x-4)(x+2)(x+3)} = \frac{A}{x-4}+\frac{B}{x+2}+\frac{C}{x+3}\]



    Solution


  50. Question

    In Calculus, when integrating rational expressions, it is often helpful to perform partial-fraction decomposition.

    The procedure can be exemplified by trying to determine constants \(A\), \(B\), and \(C\) to satisfy the equation below for all values of \(x\).

    \[\frac{2x^2-3x+18}{(x-6)(x-3)(x-2)} = \frac{A}{x-6}+\frac{B}{x-3}+\frac{C}{x-2}\]



    Solution


  51. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} -7 & 2 & 2\\ -8 & -8 & -2 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  52. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} 6 & -8 & 1\\ -3 & 5 & 9\\ -2 & 9 & 8\\ 1 & -5 & 3\\ 0 & -4 & 3\\ -3 & -8 & -3\\ -2 & 5 & 1 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  53. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} 4 & -7 & -7 & 0 & -7 & -2 & -7\\ -4 & 1 & -6 & 5 & -2 & -9 & -9\\ 7 & -8 & 9 & 5 & 9 & -6 & -1\\ -2 & 7 & 3 & 3 & 5 & -4 & 8 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  54. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} 2 & 8 & -4 & -1 & 8 & -8 & -2\\ 3 & 1 & 3 & 7 & -4 & -9 & 0 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  55. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} 6 & -5 & -3 & -1 & 0 & 6 & 9\\ -5 & 3 & 2 & 1 & 1 & 2 & -5\\ 9 & -7 & 1 & 4 & -2 & 9 & 3\\ -7 & 9 & 1 & -2 & 7 & 5 & -3 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  56. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} 7 & 4 & -8 & 0 & 8 & 9 & -6\\ 3 & -4 & 8 & 0 & 2 & -5 & -3\\ -1 & -7 & 2 & 8 & -9 & 2 & 5\\ -8 & 2 & -6 & -8 & -6 & 5 & 6 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  57. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} -1 & -1 & -2\\ 4 & -3 & 9\\ -3 & 8 & -5\\ 0 & -4 & -2 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  58. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} 3 & 2 & 2 & -5 & 7 & -3\\ 7 & -5 & -5 & 5 & 2 & 3\\ -8 & 3 & 4 & -7 & -7 & 8 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  59. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} 9 & 3 & 8 & -1 & -6\\ -9 & 2 & 5 & 4 & -4 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  60. Question

    A matrix is a rectangular array of numbers. The dimensions of a matrix represent the number of rows and the number of columns (in that order!). Find the dimensions of the matrix below.

    \[\begin{bmatrix} -8 & 4 & -9 & -5\\ 0 & 3 & 8 & 3\\ -8 & 0 & -4 & 2 \end{bmatrix}\]

    Dimensions: \(\times\)



    Solution


  61. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} -8 & -2\\ -2 & -2\\ -6 & 2 \end{bmatrix}\] \[B=\begin{bmatrix} 2 & 3 & 5 & 3\\ -6 & 7 & 4 & -3\\ -8 & 3 & -7 & -6\\ -9 & -5 & -1 & 0\\ 0 & -1 & 5 & 3\\ 5 & 7 & 2 & -6 \end{bmatrix}\]



    Solution


  62. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} 7 & 3 & -4 & -1 & 6 & 8\\ 6 & -4 & 4 & -2 & -1 & 6 \end{bmatrix}\] \[B=\begin{bmatrix} -4 & 3 & -3 & 0\\ -6 & 4 & 9 & 2\\ -8 & -3 & 2 & -9 \end{bmatrix}\]



    Solution


  63. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} 7 & -5 & 6 & 2\\ 8 & 0 & 7 & 0 \end{bmatrix}\] \[B=\begin{bmatrix} 8 & 1 & 2\\ 9 & 7 & -6\\ 3 & 9 & 3\\ -4 & 9 & 3 \end{bmatrix}\]



    Solution


  64. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} -4 & -8\\ 2 & 5\\ -7 & -6 \end{bmatrix}\] \[B=\begin{bmatrix} 0 & -8 & -3 & -1 & -2\\ 6 & 6 & 0 & -6 & -6 \end{bmatrix}\]



    Solution


  65. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} -2 & 6 & -3 & -2 & -8 & 1\\ 0 & 4 & -3 & 2 & -1 & -2\\ 6 & -9 & 3 & 3 & 6 & -4\\ -1 & 1 & 8 & -2 & -3 & -3\\ 4 & 4 & -4 & 5 & 5 & 0 \end{bmatrix}\] \[B=\begin{bmatrix} 0 & 1 & -5\\ -9 & 6 & -9\\ -4 & -3 & -6\\ -7 & -3 & -7\\ 3 & -8 & 5\\ 5 & -6 & -6 \end{bmatrix}\]



    Solution


  66. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} -9 & 3 & 8 & -3 & 9 & 0\\ 6 & 8 & -3 & -5 & 0 & 1\\ -9 & 4 & -7 & -7 & 2 & -1 \end{bmatrix}\] \[B=\begin{bmatrix} 0 & 7 & -6 & 0 & 0\\ -8 & 5 & 2 & -1 & -8\\ 5 & -3 & 7 & -1 & -2\\ -4 & 5 & -7 & -9 & 1\\ -8 & 6 & -3 & 9 & 7\\ -1 & 8 & 7 & 8 & 7 \end{bmatrix}\]



    Solution


  67. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} 3 & 9 & 3 & -9 & 6\\ 3 & -5 & -7 & 9 & 8\\ -8 & 6 & 0 & 4 & -7\\ 4 & -4 & -9 & -6 & -1 \end{bmatrix}\] \[B=\begin{bmatrix} -8 & 0\\ -1 & -1\\ -1 & 8\\ -8 & -1\\ -9 & 5 \end{bmatrix}\]



    Solution


  68. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} -6 & 7 & -1 & 7\\ -7 & 7 & -5 & -7\\ 3 & 7 & 3 & -8\\ 8 & 7 & 4 & 5\\ -8 & 3 & 4 & 7 \end{bmatrix}\] \[B=\begin{bmatrix} -1 & -3 & -3\\ -5 & -3 & 1\\ -3 & 4 & 8\\ 3 & 3 & 7 \end{bmatrix}\]



    Solution


  69. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} 5 & 7 & 8 & 4 & 0 & 0\\ 6 & 6 & -8 & -9 & 5 & -4\\ 3 & 0 & 4 & 7 & -1 & -9 \end{bmatrix}\] \[B=\begin{bmatrix} -2 & -4\\ -5 & 7\\ -8 & 6\\ -7 & -9 \end{bmatrix}\]



    Solution


  70. Question

    If the dimensions of matrix \(A\) are \(m\times n\) and the dimensions of matrix \(B\) are \(p\times q\), then the matrix-multiplication \(AB\) is only possible if \(n=p\).

    \[A=\begin{bmatrix} 0 & 4 & -8 & -6 & -8\\ -2 & 3 & -9 & 6 & -1\\ 1 & 1 & 2 & -9 & 1 \end{bmatrix}\] \[B=\begin{bmatrix} 9 & 0\\ 5 & -2\\ -5 & 6\\ -1 & 0\\ -4 & -1\\ 4 & -3 \end{bmatrix}\]



    Solution


  71. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} -1 & 0 & 1\\ 4 & 7 & 2 \end{bmatrix}\] \[B = \begin{bmatrix} 6 & -1 & 1 & 9\\ 6 & 3 & 7 & -4\\ 6 & -5 & -2 & 7 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  72. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} -2 & -2 & 7\\ -3 & -7 & 4\\ -2 & 6 & 5\\ 3 & -7 & 7 \end{bmatrix}\] \[B = \begin{bmatrix} -9 & -4\\ 9 & 3\\ 0 & 8 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  73. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} 0 & 4 & -1 & 3\\ -6 & 8 & 0 & 7\\ -8 & -8 & 2 & -2 \end{bmatrix}\] \[B = \begin{bmatrix} -5 & -6\\ -8 & -4\\ 0 & -3\\ 7 & 8 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  74. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} -6 & -4 & 0\\ -3 & -6 & -3\\ 1 & 0 & -2\\ 7 & -4 & 0 \end{bmatrix}\] \[B = \begin{bmatrix} -3 & -3\\ -9 & 5\\ 1 & -1 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  75. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} -2 & 4 & 8 & -3\\ -4 & -3 & 3 & 5\\ 7 & -1 & 1 & 9 \end{bmatrix}\] \[B = \begin{bmatrix} -3 & -4\\ 5 & -8\\ -7 & 1\\ 8 & -6 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  76. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} 0 & 9 & 7\\ 2 & 8 & 9\\ -1 & -4 & 9\\ -3 & -9 & 8 \end{bmatrix}\] \[B = \begin{bmatrix} -9 & 5\\ 7 & -3\\ -1 & -7 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  77. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} 5 & -3 & -2\\ -3 & -9 & 7\\ 8 & 7 & -9\\ 7 & -8 & 2 \end{bmatrix}\] \[B = \begin{bmatrix} -1 & 4\\ -1 & 3\\ 1 & 8 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  78. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} -2 & 6\\ 5 & 0\\ -1 & 1\\ -1 & 3 \end{bmatrix}\] \[B = \begin{bmatrix} 0 & -5 & 9\\ -1 & -7 & 6 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  79. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} -9 & 0\\ 0 & 2\\ 0 & -1 \end{bmatrix}\] \[B = \begin{bmatrix} 6 & -6 & 3 & 7\\ -8 & -5 & 0 & 4 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  80. Question

    Matrices \(A\) and \(B\) are defined below.

    \[A = \begin{bmatrix} 9 & -3 & 8\\ -7 & 3 & -6\\ 4 & -3 & -5\\ 7 & 0 & -9 \end{bmatrix}\] \[B = \begin{bmatrix} 1 & -6\\ 6 & -7\\ 4 & -7 \end{bmatrix}\]

    Find the product \(C=AB\).

    \(AB=\)


    Solution


  81. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.19 0.84 6.24 9.22 4.01 3.70 2.28 4.79
    More Munchies 1.70 1.06 4.92 9.15 3.01 3.10 3.19 5.75
    Nick’s Necessities 1.52 0.81 5.12 7.53 3.13 4.95 2.33 6.97
    Overpriced Options 1.67 1.01 6.47 9.50 4.39 3.73 2.78 6.32
    Price Pincher 1.65 0.97 6.60 6.90 3.41 4.34 2.88 4.66

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 0 3 2 1 1 0
    banana 1 4 0 0 2 0
    cherry 0 1 4 0 2 1
    durian 1 2 0 4 0 4
    eggplant 0 0 2 2 4 2
    fig 3 1 0 3 0 0
    grapefruit 2 2 1 2 2 2
    honeydew 1 0 2 0 0 0

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.19,0.84,6.24,9.22,4.01,3.70,2.28,4.79],
                [1.70,1.06,4.92,9.15,3.01,3.10,3.19,5.75],
                [1.52,0.81,5.12,7.53,3.13,4.95,2.33,6.97],
                [1.67,1.01,6.47,9.50,4.39,3.73,2.78,6.32],
                [1.65,0.97,6.60,6.90,3.41,4.34,2.88,4.66]])
    
    Q = matrix([[0,3,2,1,1,0],
                [1,4,0,0,2,0],
                [0,1,4,0,2,1],
                [1,2,0,4,0,4],
                [0,0,2,2,4,2],
                [3,1,0,3,0,0],
                [2,2,1,2,2,2],
                [1,0,2,0,0,0]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  82. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.32 1.12 5.14 6.32 4.29 4.23 3.11 4.80
    More Munchies 1.42 0.91 7.23 8.07 3.74 4.63 2.52 4.50
    Nick’s Necessities 1.65 0.91 4.76 7.80 3.38 3.06 3.32 6.98
    Overpriced Options 1.78 1.01 6.84 6.16 4.97 4.06 2.83 6.52
    Price Pincher 1.61 0.70 6.17 8.39 4.46 4.29 3.04 5.96

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 1 1 0 1 1 4
    banana 0 1 2 0 4 0
    cherry 0 0 0 3 2 1
    durian 0 0 0 0 1 2
    eggplant 0 0 1 2 0 0
    fig 4 2 4 4 0 1
    grapefruit 3 1 2 2 2 0
    honeydew 1 4 0 2 0 1

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.32,1.12,5.14,6.32,4.29,4.23,3.11,4.80],
                [1.42,0.91,7.23,8.07,3.74,4.63,2.52,4.50],
                [1.65,0.91,4.76,7.80,3.38,3.06,3.32,6.98],
                [1.78,1.01,6.84,6.16,4.97,4.06,2.83,6.52],
                [1.61,0.70,6.17,8.39,4.46,4.29,3.04,5.96]])
    
    Q = matrix([[1,1,0,1,1,4],
                [0,1,2,0,4,0],
                [0,0,0,3,2,1],
                [0,0,0,0,1,2],
                [0,0,1,2,0,0],
                [4,2,4,4,0,1],
                [3,1,2,2,2,0],
                [1,4,0,2,0,1]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  83. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.79 0.85 7.24 9.56 4.73 4.92 2.96 4.88
    More Munchies 1.30 1.02 5.59 7.41 4.09 4.66 3.66 4.75
    Nick’s Necessities 1.23 0.77 7.04 9.19 3.63 4.30 2.27 5.79
    Overpriced Options 1.76 0.97 5.67 9.56 3.29 3.84 2.73 5.31
    Price Pincher 1.55 0.76 6.73 8.27 3.76 3.42 2.74 5.16

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 4 4 2 4 1 2
    banana 0 0 2 1 3 2
    cherry 0 0 1 0 0 1
    durian 2 2 0 0 2 0
    eggplant 2 2 2 0 0 4
    fig 3 3 1 2 1 1
    grapefruit 1 1 0 1 4 1
    honeydew 1 0 3 2 1 0

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.79,0.85,7.24,9.56,4.73,4.92,2.96,4.88],
                [1.30,1.02,5.59,7.41,4.09,4.66,3.66,4.75],
                [1.23,0.77,7.04,9.19,3.63,4.30,2.27,5.79],
                [1.76,0.97,5.67,9.56,3.29,3.84,2.73,5.31],
                [1.55,0.76,6.73,8.27,3.76,3.42,2.74,5.16]])
    
    Q = matrix([[4,4,2,4,1,2],
                [0,0,2,1,3,2],
                [0,0,1,0,0,1],
                [2,2,0,0,2,0],
                [2,2,2,0,0,4],
                [3,3,1,2,1,1],
                [1,1,0,1,4,1],
                [1,0,3,2,1,0]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  84. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.36 0.84 4.60 7.59 3.16 3.60 2.27 5.65
    More Munchies 1.38 0.99 4.86 8.83 4.54 4.50 2.54 6.01
    Nick’s Necessities 1.14 0.92 7.38 7.74 4.90 4.26 2.29 5.69
    Overpriced Options 1.22 0.85 6.79 7.52 3.17 3.24 2.49 5.76
    Price Pincher 1.85 0.70 4.55 9.10 4.35 3.79 2.39 4.64

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 0 2 2 1 4 0
    banana 4 0 2 4 1 1
    cherry 1 0 1 2 1 2
    durian 1 2 0 1 0 2
    eggplant 0 1 0 2 2 3
    fig 0 1 1 1 3 1
    grapefruit 0 0 4 0 0 1
    honeydew 2 1 1 2 1 4

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.36,0.84,4.60,7.59,3.16,3.60,2.27,5.65],
                [1.38,0.99,4.86,8.83,4.54,4.50,2.54,6.01],
                [1.14,0.92,7.38,7.74,4.90,4.26,2.29,5.69],
                [1.22,0.85,6.79,7.52,3.17,3.24,2.49,5.76],
                [1.85,0.70,4.55,9.10,4.35,3.79,2.39,4.64]])
    
    Q = matrix([[0,2,2,1,4,0],
                [4,0,2,4,1,1],
                [1,0,1,2,1,2],
                [1,2,0,1,0,2],
                [0,1,0,2,2,3],
                [0,1,1,1,3,1],
                [0,0,4,0,0,1],
                [2,1,1,2,1,4]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  85. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.83 0.91 6.73 7.81 4.23 4.77 3.21 5.05
    More Munchies 1.64 0.85 6.01 9.45 3.77 3.86 3.59 5.81
    Nick’s Necessities 1.73 1.09 5.98 8.48 3.62 3.39 3.34 5.19
    Overpriced Options 1.63 0.96 6.47 8.77 3.90 3.37 2.86 5.17
    Price Pincher 1.30 0.92 6.11 8.11 3.05 4.08 2.34 5.98

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 1 0 0 2 0 0
    banana 0 2 0 0 0 2
    cherry 4 4 1 0 1 1
    durian 1 1 0 1 2 0
    eggplant 0 0 4 1 2 4
    fig 3 0 2 0 2 1
    grapefruit 2 2 3 4 3 0
    honeydew 0 1 1 3 4 3

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.83,0.91,6.73,7.81,4.23,4.77,3.21,5.05],
                [1.64,0.85,6.01,9.45,3.77,3.86,3.59,5.81],
                [1.73,1.09,5.98,8.48,3.62,3.39,3.34,5.19],
                [1.63,0.96,6.47,8.77,3.90,3.37,2.86,5.17],
                [1.30,0.92,6.11,8.11,3.05,4.08,2.34,5.98]])
    
    Q = matrix([[1,0,0,2,0,0],
                [0,2,0,0,0,2],
                [4,4,1,0,1,1],
                [1,1,0,1,2,0],
                [0,0,4,1,2,4],
                [3,0,2,0,2,1],
                [2,2,3,4,3,0],
                [0,1,1,3,4,3]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  86. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.16 1.02 6.56 8.14 4.03 3.87 3.55 4.57
    More Munchies 1.19 1.03 5.79 9.88 3.44 4.69 2.55 4.94
    Nick’s Necessities 1.73 0.73 6.41 7.02 3.82 4.24 3.38 5.81
    Overpriced Options 1.76 0.96 6.44 9.17 4.59 4.12 3.39 6.61
    Price Pincher 1.28 1.10 5.12 7.13 3.08 4.24 3.57 6.80

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 1 2 1 1 0 1
    banana 2 2 0 0 3 2
    cherry 0 4 1 1 4 0
    durian 1 1 0 3 2 0
    eggplant 0 0 2 0 2 2
    fig 2 1 2 2 0 3
    grapefruit 2 3 4 2 1 1
    honeydew 0 1 3 2 1 0

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.16,1.02,6.56,8.14,4.03,3.87,3.55,4.57],
                [1.19,1.03,5.79,9.88,3.44,4.69,2.55,4.94],
                [1.73,0.73,6.41,7.02,3.82,4.24,3.38,5.81],
                [1.76,0.96,6.44,9.17,4.59,4.12,3.39,6.61],
                [1.28,1.10,5.12,7.13,3.08,4.24,3.57,6.80]])
    
    Q = matrix([[1,2,1,1,0,1],
                [2,2,0,0,3,2],
                [0,4,1,1,4,0],
                [1,1,0,3,2,0],
                [0,0,2,0,2,2],
                [2,1,2,2,0,3],
                [2,3,4,2,1,1],
                [0,1,3,2,1,0]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  87. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.50 1.00 5.88 9.25 4.73 4.36 3.25 5.65
    More Munchies 1.47 0.83 5.99 9.70 4.87 3.33 2.32 5.83
    Nick’s Necessities 1.66 0.84 4.53 6.54 4.45 3.19 3.43 5.01
    Overpriced Options 1.71 0.95 5.16 9.79 4.16 4.13 3.28 7.23
    Price Pincher 1.48 1.11 6.97 6.65 3.13 3.80 2.53 6.86

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 2 1 3 2 0 0
    banana 3 1 2 0 1 3
    cherry 1 3 0 1 2 2
    durian 1 0 0 1 4 2
    eggplant 1 0 1 4 1 4
    fig 4 0 0 2 0 2
    grapefruit 0 2 1 2 2 0
    honeydew 2 2 1 0 1 1

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.50,1.00,5.88,9.25,4.73,4.36,3.25,5.65],
                [1.47,0.83,5.99,9.70,4.87,3.33,2.32,5.83],
                [1.66,0.84,4.53,6.54,4.45,3.19,3.43,5.01],
                [1.71,0.95,5.16,9.79,4.16,4.13,3.28,7.23],
                [1.48,1.11,6.97,6.65,3.13,3.80,2.53,6.86]])
    
    Q = matrix([[2,1,3,2,0,0],
                [3,1,2,0,1,3],
                [1,3,0,1,2,2],
                [1,0,0,1,4,2],
                [1,0,1,4,1,4],
                [4,0,0,2,0,2],
                [0,2,1,2,2,0],
                [2,2,1,0,1,1]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  88. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.76 0.74 4.92 6.26 3.39 3.33 2.85 6.93
    More Munchies 1.21 1.01 5.64 9.80 4.12 3.30 2.79 6.96
    Nick’s Necessities 1.55 0.84 4.98 9.90 3.86 4.19 2.33 4.63
    Overpriced Options 1.18 1.05 4.58 6.53 3.62 3.28 3.32 6.99
    Price Pincher 1.30 0.72 7.41 7.01 4.68 4.35 2.97 6.34

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 2 3 2 0 1 1
    banana 1 1 0 1 0 2
    cherry 0 0 1 0 0 2
    durian 0 2 3 2 4 0
    eggplant 0 1 1 1 2 0
    fig 0 4 2 4 2 4
    grapefruit 2 1 1 1 2 0
    honeydew 4 0 0 2 1 2

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.76,0.74,4.92,6.26,3.39,3.33,2.85,6.93],
                [1.21,1.01,5.64,9.80,4.12,3.30,2.79,6.96],
                [1.55,0.84,4.98,9.90,3.86,4.19,2.33,4.63],
                [1.18,1.05,4.58,6.53,3.62,3.28,3.32,6.99],
                [1.30,0.72,7.41,7.01,4.68,4.35,2.97,6.34]])
    
    Q = matrix([[2,3,2,0,1,1],
                [1,1,0,1,0,2],
                [0,0,1,0,0,2],
                [0,2,3,2,4,0],
                [0,1,1,1,2,0],
                [0,4,2,4,2,4],
                [2,1,1,1,2,0],
                [4,0,0,2,1,2]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  89. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.21 1.06 7.37 6.20 3.99 4.66 3.66 6.21
    More Munchies 1.60 0.76 4.83 7.77 3.48 4.16 3.16 5.83
    Nick’s Necessities 1.26 0.95 6.74 7.47 4.07 3.84 3.05 6.84
    Overpriced Options 1.55 1.11 6.58 6.82 4.54 3.84 2.38 6.80
    Price Pincher 1.31 0.94 6.08 9.14 3.14 3.10 3.60 6.21

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 3 2 0 3 0 0
    banana 2 0 1 2 1 2
    cherry 0 1 4 0 4 1
    durian 4 2 1 1 2 2
    eggplant 1 2 0 0 1 0
    fig 2 1 2 0 2 2
    grapefruit 0 4 0 0 3 0
    honeydew 0 1 0 1 2 3

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.21,1.06,7.37,6.20,3.99,4.66,3.66,6.21],
                [1.60,0.76,4.83,7.77,3.48,4.16,3.16,5.83],
                [1.26,0.95,6.74,7.47,4.07,3.84,3.05,6.84],
                [1.55,1.11,6.58,6.82,4.54,3.84,2.38,6.80],
                [1.31,0.94,6.08,9.14,3.14,3.10,3.60,6.21]])
    
    Q = matrix([[3,2,0,3,0,0],
                [2,0,1,2,1,2],
                [0,1,4,0,4,1],
                [4,2,1,1,2,2],
                [1,2,0,0,1,0],
                [2,1,2,0,2,2],
                [0,4,0,0,3,0],
                [0,1,0,1,2,3]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  90. Question

    In a 15-minute city, all the following grocery stores are within a quick walk, and their prices (in USD) for some foods are shown.

    apple banana cherry durian eggplant fig grapefruit honeydew
    Lovely Lunches 1.85 0.86 7.01 8.26 3.23 3.38 2.68 5.47
    More Munchies 1.48 1.04 6.28 7.05 4.61 3.12 3.59 6.74
    Nick’s Necessities 1.49 0.96 7.00 9.95 3.53 4.87 3.72 5.52
    Overpriced Options 1.51 0.90 4.67 8.91 4.85 4.99 2.40 5.75
    Price Pincher 1.59 0.77 5.23 7.43 3.42 4.26 3.64 6.08

    Each of the people below plans to go shopping for those foods. Their grocery lists are shown.

    Quintin Rachel Sebastian Trevor Ursula Venus
    apple 2 2 1 1 0 2
    banana 1 1 2 2 1 1
    cherry 0 4 0 2 1 3
    durian 0 2 0 1 1 4
    eggplant 3 0 0 0 3 2
    fig 2 0 2 0 4 1
    grapefruit 0 1 2 4 0 0
    honeydew 1 0 1 3 0 0

    We can create these matrices in SageMath using the following commands:

    P = matrix([[1.85,0.86,7.01,8.26,3.23,3.38,2.68,5.47],
                [1.48,1.04,6.28,7.05,4.61,3.12,3.59,6.74],
                [1.49,0.96,7.00,9.95,3.53,4.87,3.72,5.52],
                [1.51,0.90,4.67,8.91,4.85,4.99,2.40,5.75],
                [1.59,0.77,5.23,7.43,3.42,4.26,3.64,6.08]])
    
    Q = matrix([[2,2,1,1,0,2],
                [1,1,2,2,1,1],
                [0,4,0,2,1,3],
                [0,2,0,1,1,4],
                [3,0,0,0,3,2],
                [2,0,2,0,4,1],
                [0,1,2,4,0,0],
                [1,0,1,3,0,0]])

    We can find the product of these matrices.

    pretty_print(P*Q)

    What is the maximum possible cost of a grocery trip?


    Solution


  91. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 3 & 5 & 4\\ 1 & 2 & 6 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 3 & 5 & 4\\ 1 & 2 & 6 \end{bmatrix}\] \[B = \begin{bmatrix} 3 & 1 & 5\\ 2 & 4 & 6 \end{bmatrix}\] \[C = \begin{bmatrix} 3 & 2\\ 1 & 4\\ 5 & 6 \end{bmatrix}\] \[D = \begin{bmatrix} 3 & 1\\ 5 & 2\\ 4 & 6 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  92. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 9 & 10 & 12\\ 2 & 8 & 6\\ 4 & 5 & 1\\ 3 & 11 & 7 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 9 & 2 & 4\\ 3 & 10 & 8\\ 5 & 11 & 12\\ 6 & 1 & 7 \end{bmatrix}\] \[B = \begin{bmatrix} 9 & 3 & 5 & 6\\ 2 & 10 & 11 & 1\\ 4 & 8 & 12 & 7 \end{bmatrix}\] \[C = \begin{bmatrix} 9 & 10 & 12\\ 2 & 8 & 6\\ 4 & 5 & 1\\ 3 & 11 & 7 \end{bmatrix}\] \[D = \begin{bmatrix} 9 & 2 & 4 & 3\\ 10 & 8 & 5 & 11\\ 12 & 6 & 1 & 7 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  93. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 1 & 4 & 3\\ 2 & 6 & 5 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 1 & 4 & 3\\ 2 & 6 & 5 \end{bmatrix}\] \[B = \begin{bmatrix} 1 & 2 & 4\\ 6 & 3 & 5 \end{bmatrix}\] \[C = \begin{bmatrix} 1 & 6\\ 2 & 3\\ 4 & 5 \end{bmatrix}\] \[D = \begin{bmatrix} 1 & 2\\ 4 & 6\\ 3 & 5 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  94. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 2 & 11 & 12 & 6\\ 4 & 1 & 5 & 3\\ 8 & 7 & 10 & 9 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 2 & 11 & 12 & 6\\ 4 & 1 & 5 & 3\\ 8 & 7 & 10 & 9 \end{bmatrix}\] \[B = \begin{bmatrix} 2 & 1 & 10\\ 4 & 7 & 6\\ 8 & 12 & 3\\ 11 & 5 & 9 \end{bmatrix}\] \[C = \begin{bmatrix} 2 & 4 & 8 & 11\\ 1 & 7 & 12 & 5\\ 10 & 6 & 3 & 9 \end{bmatrix}\] \[D = \begin{bmatrix} 2 & 4 & 8\\ 11 & 1 & 7\\ 12 & 5 & 10\\ 6 & 3 & 9 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  95. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 6 & 8\\ 4 & 5\\ 2 & 3\\ 7 & 1 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 6 & 4 & 2 & 7\\ 8 & 5 & 3 & 1 \end{bmatrix}\] \[B = \begin{bmatrix} 6 & 4\\ 2 & 7\\ 8 & 5\\ 3 & 1 \end{bmatrix}\] \[C = \begin{bmatrix} 6 & 2 & 8 & 3\\ 4 & 7 & 5 & 1 \end{bmatrix}\] \[D = \begin{bmatrix} 6 & 8\\ 4 & 5\\ 2 & 3\\ 7 & 1 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  96. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 3 & 6\\ 1 & 2\\ 5 & 4 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 3 & 6\\ 1 & 2\\ 5 & 4 \end{bmatrix}\] \[B = \begin{bmatrix} 3 & 5 & 2\\ 1 & 6 & 4 \end{bmatrix}\] \[C = \begin{bmatrix} 3 & 1\\ 5 & 6\\ 2 & 4 \end{bmatrix}\] \[D = \begin{bmatrix} 3 & 1 & 5\\ 6 & 2 & 4 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  97. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 5 & 4\\ 2 & 1\\ 6 & 3 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 5 & 2 & 6\\ 4 & 1 & 3 \end{bmatrix}\] \[B = \begin{bmatrix} 5 & 6 & 1\\ 2 & 4 & 3 \end{bmatrix}\] \[C = \begin{bmatrix} 5 & 2\\ 6 & 4\\ 1 & 3 \end{bmatrix}\] \[D = \begin{bmatrix} 5 & 4\\ 2 & 1\\ 6 & 3 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  98. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 1 & 3\\ 5 & 8\\ 2 & 7\\ 4 & 6 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 1 & 5\\ 2 & 4\\ 3 & 8\\ 7 & 6 \end{bmatrix}\] \[B = \begin{bmatrix} 1 & 5 & 2 & 4\\ 3 & 8 & 7 & 6 \end{bmatrix}\] \[C = \begin{bmatrix} 1 & 3\\ 5 & 8\\ 2 & 7\\ 4 & 6 \end{bmatrix}\] \[D = \begin{bmatrix} 1 & 2 & 3 & 7\\ 5 & 4 & 8 & 6 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  99. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 2 & 1\\ 4 & 5\\ 3 & 6 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 2 & 4 & 3\\ 1 & 5 & 6 \end{bmatrix}\] \[B = \begin{bmatrix} 2 & 4\\ 3 & 1\\ 5 & 6 \end{bmatrix}\] \[C = \begin{bmatrix} 2 & 3 & 5\\ 4 & 1 & 6 \end{bmatrix}\] \[D = \begin{bmatrix} 2 & 1\\ 4 & 5\\ 3 & 6 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  100. Question

    Let matrix \(M\) be defined below:

    \[M = \begin{bmatrix} 5 & 2\\ 1 & 8\\ 3 & 7\\ 4 & 6 \end{bmatrix}\]

    Which matrix equals \(M^\mathrm{T}\), the transpose of \(M\)?

    \[A = \begin{bmatrix} 5 & 1 & 3 & 4\\ 2 & 8 & 7 & 6 \end{bmatrix}\] \[B = \begin{bmatrix} 5 & 1\\ 3 & 4\\ 2 & 8\\ 7 & 6 \end{bmatrix}\] \[C = \begin{bmatrix} 5 & 2\\ 1 & 8\\ 3 & 7\\ 4 & 6 \end{bmatrix}\] \[D = \begin{bmatrix} 5 & 3 & 2 & 7\\ 1 & 4 & 8 & 6 \end{bmatrix}\]


    1. A
    2. B
    3. C
    4. D

    Solution


  101. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=3.61\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  102. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=5.60\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  103. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=2.21\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  104. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=5.91\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  105. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=2.24\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  106. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=5.99\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  107. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=2.48\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  108. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=4.41\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  109. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=0.63\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  110. Question

    The 2D rotation matrix is defined below for a counter-clockwise rotation by an angle \(\theta\) when it is the first operand in matrix multiplication.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix} \]

    Let \(\theta=4.97\) radians. Determine \(R\) (approximate decimal values).

    \(R =\)



    Solution


  111. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} 4 & 3 & 7 & 5 & -4 & 1 & -6 & -6 & 2 & -2 & -6\\ 4 & -2 & -1 & 5 & -1 & -2 & 7 & 2 & 4 & 7 & -5 \end{bmatrix}\]

    P = matrix([[4,3,7,5,-4,1,-6,-6,2,-2,-6],[4,-2,-1,5,-1,-2,7,2,4,7,-5]])

    Rotation matrix

    We want to rotate the points by \(\theta=0.93\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  112. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} 4 & 6 & 1 & -6 & 3 & 3 & 5 & 5 & -5 & 3 & -4 & -2\\ -3 & 2 & 6 & 4 & 2 & -6 & -1 & 3 & 1 & -6 & -3 & 5 \end{bmatrix}\]

    P = matrix([[4,6,1,-6,3,3,5,5,-5,3,-4,-2],[-3,2,6,4,2,-6,-1,3,1,-6,-3,5]])

    Rotation matrix

    We want to rotate the points by \(\theta=4.44\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  113. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} -7 & -3 & -5 & 4 & -1 & 7 & 3 & -7 & -5 & 4 & -6\\ -3 & 4 & -5 & 7 & -1 & 2 & -6 & -1 & -5 & 6 & 0 \end{bmatrix}\]

    P = matrix([[-7,-3,-5,4,-1,7,3,-7,-5,4,-6],[-3,4,-5,7,-1,2,-6,-1,-5,6,0]])

    Rotation matrix

    We want to rotate the points by \(\theta=4.98\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  114. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} 3 & 5 & 3 & 3 & -5 & 1 & 5 & -4 & 1 & 7 & 6 & 2\\ -1 & 0 & 7 & 1 & 0 & 1 & -7 & -7 & -1 & -6 & 0 & -1 \end{bmatrix}\]

    P = matrix([[3,5,3,3,-5,1,5,-4,1,7,6,2],[-1,0,7,1,0,1,-7,-7,-1,-6,0,-1]])

    Rotation matrix

    We want to rotate the points by \(\theta=5.37\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  115. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} -5 & -7 & 7 & -7 & 6 & 2 & 6 & -6 & -2 & 6 & -5\\ -2 & 0 & -6 & -1 & 6 & 2 & -7 & 1 & -1 & -7 & 5 \end{bmatrix}\]

    P = matrix([[-5,-7,7,-7,6,2,6,-6,-2,6,-5],[-2,0,-6,-1,6,2,-7,1,-1,-7,5]])

    Rotation matrix

    We want to rotate the points by \(\theta=3.36\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  116. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} -2 & -4 & -4 & -7 & -4 & 7 & -5 & 7 & 7\\ -1 & -2 & 6 & 2 & 7 & -6 & -4 & -6 & 7 \end{bmatrix}\]

    P = matrix([[-2,-4,-4,-7,-4,7,-5,7,7],[-1,-2,6,2,7,-6,-4,-6,7]])

    Rotation matrix

    We want to rotate the points by \(\theta=0.71\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  117. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} -2 & 2 & 6 & 2 & -7 & 5 & 5 & -2 & 5\\ -7 & 5 & 4 & -6 & 6 & 6 & -5 & 6 & -3 \end{bmatrix}\]

    P = matrix([[-2,2,6,2,-7,5,5,-2,5],[-7,5,4,-6,6,6,-5,6,-3]])

    Rotation matrix

    We want to rotate the points by \(\theta=4.63\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  118. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} -2 & -1 & 0 & 4 & -4 & -6 & -3 & 2 & 6 & 7 & -1 & -1\\ 5 & -2 & -7 & 7 & 6 & 2 & -7 & -4 & -1 & -3 & 6 & -6 \end{bmatrix}\]

    P = matrix([[-2,-1,0,4,-4,-6,-3,2,6,7,-1,-1],[5,-2,-7,7,6,2,-7,-4,-1,-3,6,-6]])

    Rotation matrix

    We want to rotate the points by \(\theta=1.42\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  119. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} 0 & -3 & -4 & -4 & 6 & -4 & 3 & 4 & -3 & 6\\ 3 & -1 & -2 & -4 & -4 & -5 & -2 & -7 & -5 & -7 \end{bmatrix}\]

    P = matrix([[0,-3,-4,-4,6,-4,3,4,-3,6],[3,-1,-2,-4,-4,-5,-2,-7,-5,-7]])

    Rotation matrix

    We want to rotate the points by \(\theta=0.88\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  120. Question

    Matrix of original points (preimage)

    A list of 2D-cartesian points is stored as the preimage matrix. Each column represents one point.

    \[P = \begin{bmatrix} 7 & -5 & -4 & 7 & 4 & -3 & 1 & -6 & -2 & 4 & 3 & -5\\ 6 & -2 & 5 & 1 & -5 & -5 & -6 & 7 & -2 & 0 & 7 & -3 \end{bmatrix}\]

    P = matrix([[7,-5,-4,7,4,-3,1,-6,-2,4,3,-5],[6,-2,5,1,-5,-5,-6,7,-2,0,7,-3]])

    Rotation matrix

    We want to rotate the points by \(\theta=4.12\) radians counterclockwise. We will do this by matrix multiplication with the 2D rotation matrix.

    \[R = \begin{bmatrix}\cos(\theta) & -\sin(\theta) \\ \sin(\theta) & \cos(\theta) \end{bmatrix}\]

    Image

    We can apply the rotation to the points through matrix multiplication. Remember, matrix multiplication is not commutative. Let \(T\) represent a matrix holding the final positions of the image (after the transformation).

    \[T = RP\]

    After you calculate \(T\), you can plot the points in \(T\) with the following code (in SageMath):

    point(T.transpose(),xmin=-10,xmax=10,ymin=-10,ymax=10,size=50)

    Which is the graph of the points in \(T\)? (Please excuse minor stylistic differences due to my graphs being made in R, not SageMath.)

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  121. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A rotation by angle 4.24.
    2. A vertical shear by factor 2.2.
    3. A horizontal shear by factor 1.5.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  122. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A horizontal stretch by factor 1.9.
    2. A vertical shear by factor 2.3.
    3. A rotation by angle 4.18.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  123. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A horizontal shear by factor 1.6.
    2. A vertical shear by factor 2.2.
    3. A rotation by angle 4.89.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  124. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A horizontal stretch by factor 2.3.
    2. A rotation by angle 0.4.
    3. A vertical stretch by factor 1.7.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  125. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A vertical shear by factor 2.2.
    2. A rotation by angle 0.53.
    3. A horizontal shear by factor 1.3.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  126. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A vertical shear by factor 1.5.
    2. A vertical stretch by factor 1.3.
    3. A rotation by angle 2.79.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  127. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A rotation by angle 3.41.
    2. A horizontal shear by factor 2.2.
    3. A vertical shear by factor 1.7.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  128. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A rotation by angle 2.46.
    2. A vertical shear by factor 1.8.
    3. A horizontal shear by factor 2.3.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  129. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A rotation by angle 2.03.
    2. A vertical stretch by factor 1.6.
    3. A horizontal stretch by factor 1.4.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  130. Question

    Some basic 2D-transformation matrices are shown:

    When multiple transformations are applied, order matters. If \(A\) was the matrix of the first transformation, \(B\) was the matrix of the second transformation, \(C\) was the matrix of the third transformation, and \(X\) was a matrix of column vectors, then the result, \(X'\), would be found with the following matrix multiplication: \[X' = CBAX\] Notice, the order seems backwards; this is standard.

    Problem-specific information

    Begin with the points of a unit square.

    \[X = \begin{bmatrix}0 & 1 & 1 & 0 \\ 0 & 0 & 1 & 1\end{bmatrix}\]

    X = matrix([[0,1,1,0],[0,0,1,1]])
    polygon(X.transpose(),xmin=-5,xmax=5,ymin=-5,ymax=5,aspect_ratio=1,color="red")

    Apply the following transformations in the indicated order:

    1. A vertical shear by factor 2.3.
    2. A vertical stretch by factor 1.9.
    3. A rotation by angle 3.03.

    Which graph is generated when polygon \(X\) is plotted in red and polygon \(X'\) is plotted in blue?

    plot of chunk unnamed-chunk-2


    1. A
    2. B
    3. C
    4. D

    Solution


  131. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.33\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  132. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.71\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  133. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.39\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  134. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.65\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  135. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.71\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  136. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.67\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  137. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.71\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  138. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.25\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  139. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.68\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  140. Question

    One of the simplest 3D \(\to\) 2D projections (to draw by hand) is an oblique projection. Each type of oblique projection can be parameterized with an angle (\(\theta\)) and a ratio (\(r<1\)). Below is an oblique-projection matrix.

    \[P = \begin{bmatrix}1 & r\cos(\theta_P) & 0 \\ 0 & r\sin(\theta_P) & 1 \end{bmatrix}\]

    We can exemplify an oblique projection with \(r=0.5\) and \(\theta_P=\frac{pi}{6}\) on a unit cube. The cube has lengths 1 unit long.

    (SageMath)

    X1 = matrix([[0,0,0,0,0,1,1,0,1,1,0,1,1,0,1,1],[0,0,1,1,0,0,1,1,1,1,1,1,0,0,0,0],[0,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0]])
    r = 0.5
    tp = pi/6
    P = matrix([[1,r*cos(tp),0],[0,r*sin(tp),1]])
    flat_X1 = P*X1
    line(flat_X1.transpose(),aspect_ratio=1)

    plot of chunk unnamed-chunk-2

    In 3D, there are relatively simple rotation matrices for spinning around the \(x\), \(y\), or \(z\) axis.

    \[R_x = \begin{bmatrix}1 & 0 & 0 \\ 0 & \cos(\theta_x) & -\sin(\theta_x) \\ 0 &\sin(\theta_x) & \cos(\theta_x) \end{bmatrix}\]

    \[R_y = \begin{bmatrix}\cos(\theta_y) & 0 & \sin(\theta_y) \\ 0 & 1 & 0 \\ -\sin(\theta_y) & 0 & \cos(\theta_y) \end{bmatrix}\]

    \[R_z = \begin{bmatrix}\cos(\theta_z) & -\sin(\theta_z) & 0 \\ \sin(\theta_z) & \cos(\theta_z) & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    Information specific to this question

    Fill in the missing code to generate various rotations of a square pyramid.

    In order to flatten the 3D points onto a 2D graph, each pyramid will undergo an oblique projection with \(r=0.5\) and \(\theta_P=0.65\).

    graph01 = Graphics()
    X1 = matrix([[1,-1,-1,1,1,0,1,-1,0,-1],[-1,-1,1,1,-1,0,1,1,0,-1],[-1,-1,-1,-1,-1,1,-1,-1,1,-1]])
    P = ...
    X1_flat = ...
    graph01 += line(X1_flat.transpose(),color="red")
    Rx = ...
    X2 = ...
    X2_flat = ...
    graph01 += line(X2_flat.transpose(),color="orange")
    Ry = ...
    X3 = ...
    X3_flat = ...
    graph01 += ...
    Rz = ...
    X4 = ...
    X4_flat = ...
    graph01 += ...
    show(graph01,aspect_ratio=1,axes=False)

    Which graph matches?

    plot of chunk unnamed-chunk-3


    1. A
    2. B
    3. C
    4. D

    Solution


  141. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=0.3259576\] \[u_y=0.3402856\] \[u_z=-0.8820189\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  142. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=0.8137197\] \[u_y=0.2912837\] \[u_z=0.5030051\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  143. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=-0.6178855\] \[u_y=0.0214379\] \[u_z=-0.7859758\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  144. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=0.3080886\] \[u_y=0.9339919\] \[u_z=-0.1809436\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  145. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=-0.7237868\] \[u_y=0.6642399\] \[u_z=-0.1868634\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  146. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=0.0684043\] \[u_y=0.3809468\] \[u_z=-0.9220631\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  147. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=-0.3834826\] \[u_y=0.2169223\] \[u_z=0.8977114\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  148. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=0.3024846\] \[u_y=0.9351292\] \[u_z=0.1844896\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  149. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=0.7844959\] \[u_y=0.6080293\] \[u_z=-0.1219286\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution


  150. Question

    Your goal is to make an animation (with 20 frames) of square pyramid spinning around a given axis. In 3D space, direction can be indicated with a unit vector \(\vec{u}\):

    \[\vec{u} = \begin{bmatrix}u_x \\ u_y \\ u_z \end{bmatrix}\] A unit vector has a length of 1, so \(u_x^2+u_y^2+u_z^2=1\).

    In order to rotate points around the axis \(\vec{u}\) by an angle \(\theta\), we can use the general 3D rotation matrix:

    \[R = \begin{bmatrix} \cos(\theta)+u_x^2(1-\cos(\theta)) & u_xu_y(1-\cos(\theta))-u_z\sin(\theta) & u_xu_z(1-\cos(\theta))+u_y\sin(\theta) \\ u_yu_x(1-\cos(\theta))+u_z\sin(\theta) & \cos(\theta)+u_y^2(1-\cos(\theta)) & u_yu_z(1-\cos(\theta))-u_x\sin(\theta) \\ u_zu_x(1-\cos(\theta))-u_y\sin(\theta) & u_zu_y(1-\cos(\theta))+u_x\sin(\theta) & \cos(\theta)+u_z^2(1-\cos(\theta)) \end{bmatrix}\] Because our animation has 20 frames, the angle should be \(\theta=\frac{2\pi}{20}\).

    We will use the basic orthographic projection matrix below to flatten 3D points into a 2D plane:

    \[P = \begin{bmatrix}1 & 0 & 0 \\ 0 & 0 & 1\end{bmatrix}\]

    The axis of rotation should be:

    \[u_x=-0.8137802\] \[u_y=0.5690534\] \[u_z=0.1180675\]

    Finish the code below to graph the animation.

    n = 20 #The number of frames
    X = matrix([[ 1,-1,-1, 1, 1, 0, 1,-1, 0,-1],
                [-1,-1, 1, 1,-1, 0, 1, 1, 0,-1],
                [-1,-1,-1,-1,-1, 1,-1,-1, 1,-1]])
    P = matrix([[1,0,0],
                [0,0,1]])
    R = ######### ENTER YOUR CODE HERE ##############
    plots = []
    for i in range(n):
        XP = P*R^i*X
        nextplot = line(XP.transpose(),xmin=-2,xmax=2,ymin=-2,ymax=2,axes=False,aspect_ratio=1)
        plots.append(nextplot)
    a = animate(plots)
    show(a)

    A

    plot of chunk unnamed-chunk-2

    B

    plot of chunk unnamed-chunk-3

    C

    plot of chunk unnamed-chunk-4

    D

    plot of chunk unnamed-chunk-5


    1. A
    2. B
    3. C
    4. D

    Solution